package com.feicheng.service;

import com.alibaba.fastjson.JSONObject;
import com.feicheng.common.result.ResultInfo;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

public interface IFPayService {

    /**
     * 支付接口
     * @param param
     * @return
     */
    ResultInfo pay(JSONObject param);

    /**
     * 押金退还接口
     * @param clientId
     * @param openId
     * @param storeId
     * @param amount
     * @return
     */
    ResultInfo refundDeposit(Integer clientId, String openId, Integer storeId, Integer amount, Integer payId);

    /**
     * 押金充值统一下单接口
     * @param clientId
     * @param storeId
     * @param amount
     * @return
     */
    ResultInfo depositNewPay(Integer clientId, Integer storeId, Integer amount, String openId);

    /**
     * 押金充值统一下单接口-未支付记录支付
     * @param clientId
     * @param storeId
     * @param depositRecordId
     * @param openId
     * @return
     */
    ResultInfo depositExPay(Integer clientId, Integer storeId, Integer depositRecordId, String openId);


    /**
     * 押金充值成功回调
     * @param param 回调参数
     * @param storeId 门店ID
     * @return
     */
    ResultInfo depositNotice(
    		String nonce,
    		String signature,
    		String signatureType,
    		String timestamp,
    		String serial,
    		String body,
    		Integer storeId,
    		Integer depositId);

    /**
     * 订单消费统一下单接口
     * @param orderId
     * @param clientId
     * @param storeId
     * @param amount
     * @param openId
     * @return
     */
    ResultInfo orderPay(Integer orderId, Integer clientId, Integer storeId, Integer amount, String openId);

    /**
     * 订单消费成功回调
     * @param param
     * @param storeId
     * @return
     */
    ResultInfo orderNotice(
    		String nonce,
    		String signature,
    		String signatureType,
    		String timestamp,
    		String serial,
    		String body,
    		Integer storeId);

    /**
     * 会员卡购买统一下单接口
     * @param payId
     * @param clientId
     * @param storeId
     * @param amount
     * @param openId
     * @return
     */
    ResultInfo cardPay(Integer clientId, Integer storeId, Integer amount, String openId, Integer cardTypeId);
    

    /**
     * 会员卡购买成功回调
     * @param param
     * @param storeId
     * @return
     */
    ResultInfo cardNotice(
    		String nonce,
    		String signature,
    		String signatureType,
    		String timestamp,
    		String serial,
    		String body, 
    		Integer storeId, 
    		Integer payId, 
    		Integer cardTypeId);
    
    /**
     * 退款成功回调
     * @param param
     * @param storeId
     * @return
     */
    ResultInfo refoundNotice(
    		String nonce,
    		String signature,
    		String signatureType,
    		String timestamp,
    		String serial,
    		String body,
    		Integer storeId);
    

}
